'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 魔窟远征
 * @author agl
 */

var expeditionReset = require('./expedition/reset.js');
var expeditionEnterBattle = require('./expedition/enterBattle.js');
var expeditionExitBattle = require('./expedition/exitBattle.js');
var expeditionOpenBox = require('./expedition/openBox.js');
var expeditionGetSoldierList = require('./expedition/getSoldierList.js');
var expeditionSetSoldierList = require('./expedition/setSoldierList.js');
var expeditionShopList = require('./expedition/shopList.js');
var expeditionShopBuy = require('./expedition/shopBuy.js');

module.exports = function (app) {
    return new Handler(app);
};

var Handler = function (app) {
    this.app = app;
};

/**
 * 重置远征状态
 */
Handler.prototype.reset = function (msg, session, next) {
    expeditionReset(msg, session, next);
};

/**
 * 发起挑战
 */
Handler.prototype.enterBattle = function (msg, session, next) {
    expeditionEnterBattle(msg, session, next);
};

/**
 * 结束战斗
 */
Handler.prototype.exitBattle = function (msg, session, next) {
    expeditionExitBattle(msg, session, next);
};

/**
 * 宝箱
 */
Handler.prototype.openBox = function (msg, session, next) {
    expeditionOpenBox(msg, session, next);
};

/**
 * 查询出战阵容
 */
Handler.prototype.getSoldierList = function (msg, session, next) {
    expeditionGetSoldierList(msg, session, next);
};

/**
 * 设置出战阵容
 */
Handler.prototype.setSoldierList = function (msg, session, next) {
    expeditionSetSoldierList(msg, session, next);
};

/**
 * 查询远征商城
 */
Handler.prototype.shopList = function (msg, session, next) {
    expeditionShopList(msg, session, next);
};

/**
 * 远征商城购买
 */
Handler.prototype.shopBuy = function (msg, session, next) {
    expeditionShopBuy(msg, session, next);
};
